<link rel="stylesheet" href="ccay/example/demo.css"  type="text/css" />
<script type="text/javascript" src="ccay/example/demo.js" charset="utf-8"></script>
<script type="text/javascript" src="ccay/example/ui/money/money.js" charset="utf-8"></script>
<div id="moneyDemo">
    <div title='API' tabid='tab1'>
    <h2>1.&lt;input type="text" class="init ccay-money"/></h2>
	  <form class="init ccay-form">	
		<div class="ccay-form-body ccay-form-custom">
			<ul>						
				    <li class="ccay-form-row">
				        <samp><h3>参数</h3></samp>
						<span class="ccay-form-input">
							<h3>描述</h3>
						</span>
					</li>
					<li class="ccay-form-row">
				        <samp>currencyCodeName</samp>
						<span class="ccay-form-input">
							设置币种属性名称
						</span>
					</li>
					<li class="ccay-form-row">
				        <samp>exchangeDateName</samp>
						<span class="ccay-form-input">
							设置汇率转换日期属性名称
						</span>
					</li>
					<li class="ccay-form-row">
				        <samp>amountName</samp>
						<span class="ccay-form-input">
							设置金额属性名称
						</span>
					</li>
					<li class="ccay-form-row">
				        <samp>decimalLen</samp>
						<span class="ccay-form-input">
							小数位数,默认两位小数
						</span>
					</li>
					<li class="ccay-form-row">
				        <samp>negative</samp>
						<span class="ccay-form-input">
							是否为负数,默认true
						</span>
					</li>
					<li class="ccay-form-row">
				        <samp>maxLen</samp>
						<span class="ccay-form-input">
							整数位最大长度,默认15位
						</span>
					</li>
					<li class="ccay-form-row">
				        <samp>align</samp>
						<span class="ccay-form-input">
							数值靠左还是靠右，可选(right、left),默认为right
						</span>
					</li>
					<li class="ccay-form-row">
				        <samp>currencyCode</samp>
						<span class="ccay-form-input">
							当前币种
						</span>
					</li>
					<li class="ccay-form-row">
				        <samp>isCurrentDate</samp>
						<span class="ccay-form-input">
							汇率转换日期是否默认填入当前系统时间，可选(true、false)
						</span>
					</li>
			</ul>
		</div>
		 <h2>2.管理器manager对象：$("#xxx").manager("XMoney")</h2>
  <form class="init ccay-form">	
<div class="ccay-form-body ccay-form-custom">
<ul>						
<li class="ccay-form-row ccay-form-whole">
        <samp>setValue(param1,param2,param3)</samp>
<span class="ccay-form-input">
设置货币相关值，有三个参数（金额，币种，汇率转换日期）<br>
$("#xxx").manager("XMoney").setValue("100000","CNY","2015/3/17")
</span>
</li>
<li class="ccay-form-row">
        <samp>getValue()</samp>
<span class="ccay-form-input">
获取货币相关值
</span>
</li>
<li class="ccay-form-row ccay-form-whole">
        <samp>setReadOnly({amount:true,date:true,code:true})</samp>
<span class="ccay-form-input">
设定是否只读<br>
$("#xxx").manager("XMoney").setReadOnly({amount:false,date:false,code:false})
<div class="ccay-form-body ccay-form-custom">
<ul>
      <li class="ccay-form-row">
 	<samp class="i18n" i18nKey="amount"></samp>
 	<span class='ccay-form-input'>金额是否只读,可选(true、false)</span>
  </li>	
  <li class="ccay-form-row">
 	<samp class="i18n" i18nKey="date"></samp>
 	<span class='ccay-form-input'>汇率转换日期是否只读,可选(true、false)</span>
  </li>
  <li class="ccay-form-row">
 	<samp class="i18n" i18nKey="code"></samp>
 	<span class='ccay-form-input'>币种是否只读,可选(true、false)</span>
  </li>
</ul>
</div>
</span>
</li>
</ul>
</div>
  </form>
    </div>
    <div title='功能展示' tabid='tab2'>
	    <form id="demo1" class="init ccay-form" action="">
		    	<h4><span>功能效果展示:</span></h4>
		    	<div id="openTry"  style='padding-left:30px'>
		    		<ul >
		    			<li  class="ccay-form-input">
		    					<input type="text" id="testamount" class="init ccay-money" currencyCodeName="money.currencycode" exchangeDateName="money.exchangedate" amountName="money.amount"/>
		    			</li>
		    		</ul>
		    		<br><br>
			    <h3>html Code</h3>
				<div class='codeArea'>
					<pre id='html1'>
&lt;input type="text" id="testamount" class="init ccay-money" currencyCodeName="currencycode" exchangeDateName="exchangedate" amountName="amount"/></pre>
				</div>
				<div class="try">
					<a onclick="Ccay.example.openTry('#moneyDemo','',$('#html1').html())">亲自试一试</a>
				</div>
			</div>
		  </form>	    	
    </div>
    
    <div title="试一试" tabid="trytab" >
	    <fieldset class='ccay-demo'>
	    <legend ><h2>代码区</h2></legend>
		   
		   <span>请在下面的文本框中编辑您的代码，然后单击此按钮测试结果  ————></span><input value="try it yourself" type="button" onclick="Ccay.example.runDemo()" /> 

				<div>
				    <table  style="width:100%;">
				      <tr>
				        <td style="width:100%;">
						<h3>js Code:</h3>	
						  <!-- 高度按需来调整。默认最小应为100px -->					
	                      <textarea id="jsTxt" style="height:100px;width:99%;"></textarea>
	                    </td>   
	                  </tr>
	                  <tr>
	                    <td style="width:100%;">
						<h3>html Code:</h3>
						  <!-- 高度按需来调整。默认最小应为100px -->
	                      <textarea id="htmlTxt" style="height:100px;width:99%;"></textarea>
	                    </td>
	                  </tr> 
                    </table>
				</div>
           </fieldset>
        <fieldset class='ccay-demo'>
          <legend ><h2>结果区</h2></legend>
			<div>
				<div style="overflow:auto;" id="demoMainPanel"></div>
			</div>
        </fieldset>
     </div>
	<div title="FAQ">
	  <form class="init ccay-form">
		<div class="ccay-form-body ccay-form-custom">
		    <ul>                     
		        <li class="ccay-form-row">
		            <samp><h3>问题</h3></samp>
		           <span class="ccay-form-input">
		               <h3>解决方案</h3>
		           </span>
		        </li>
		        <!-- 若问题和内容较多，可在li中的class加上ccay-form-whole 
		        <li class="ccay-form-row">
		                          <samp class="i18n" i18nKey=""></samp>                          
		                         <span class="ccay-form-input"></span>
		        </li>  -->
		    </ul>
		</div>
	  </form>                    
    </div>  
</div>	 


